package com.etone.H2;

import java.io.File;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;

import org.h2.tools.Csv;

public class H2CVS {

	private static Connection conn = null;
	private static final String url = "jdbc:h2:mem:rtmm;" +
									"DB_CLOSE_DELAY=-1;LOG=0;" +
									"CACHE_SIZE=1536000;" +
									"LOCK_MODE=0;UNDO_LOG=0";
	private static final String userName = "sa";
	private static final String pwd = "sa";
	private static final String tableName = "ftbBssRanSession";
	
	
	public static synchronized Connection getConnection(){
		if(null == conn){
			try {
				Class.forName("org.h2.Driver");
				conn = DriverManager.getConnection(url, userName, pwd);
			} catch (Exception e) {
				e.printStackTrace();
			}
			
		}
		return conn;
	}

	
	public void readFile(File file){
		
	}
}
